From: Simon McVittie Date: Sat, 29 Oct 2016 17:37:09 +0000 (+0100) Subject: _ostree_sysroot_write_deployments_internal: stop leaking hash table X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~44^2~18 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=c8a6b037ef3eb457c25f2a6e891fc0ef59b6b7d9;p=ostree.git _ostree_sysroot_write_deployments_internal: stop leaking hash table It appears the result of assign_bootserials() is never actually used, but I haven't changed it to return void right now. Leak found with valgrind memcheck. Signed-off-by: Simon McVittie Closes: #556 Approved by: cgwalters --- diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 427e188b..cb5a4615 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -1747,7 +1747,7 @@ _ostree_sysroot_write_deployments_internal (OstreeSysroot *self, /* Assign a bootserial to each new deployment. */ - assign_bootserials (new_deployments); + g_hash_table_unref (assign_bootserials (new_deployments)); /* Determine whether or not we need to touch the bootloader * configuration. If we have an equal number of deployments with